<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibQQt: QQtWord Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibQQt
   &#160;<span id="projectnumber">v3.1</span>
   </div>
   <div id="projectbrief">开源、跨平台Qt应用程序框架中间件</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="class_q_qt_word-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QQtWord Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="class_q_qt_word.html" title="The QQtWord class. ">QQtWord</a> class.  
 <a href="class_q_qt_word.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="qqtword_8h_source.html">qqtword.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for QQtWord:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_q_qt_word.png" usemap="#QQtWord_map" alt=""/>
  <map id="QQtWord_map" name="QQtWord_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a18039e5a412cb17fbd23137df5c8a724"><td class="memItemLeft" align="right" valign="top"><a id="a18039e5a412cb17fbd23137df5c8a724"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>QQtWord</b> (QObject *parent=0)</td></tr>
<tr class="separator:a18039e5a412cb17fbd23137df5c8a724"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09e1f556f5d7dbb6dd2e242a2961ae2c"><td class="memItemLeft" align="right" valign="top"><a id="a09e1f556f5d7dbb6dd2e242a2961ae2c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_qt_word.html#a09e1f556f5d7dbb6dd2e242a2961ae2c">initWord</a> ()</td></tr>
<tr class="memdesc:a09e1f556f5d7dbb6dd2e242a2961ae2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">initWord 初始化纸张，第一张空白纸 <br /></td></tr>
<tr class="separator:a09e1f556f5d7dbb6dd2e242a2961ae2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9410fd6a9a0bffbd6e9151266cabce05"><td class="memItemLeft" align="right" valign="top"><a id="a9410fd6a9a0bffbd6e9151266cabce05"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_qt_word.html#a9410fd6a9a0bffbd6e9151266cabce05">addText</a> (const QString &amp;text, QFont m_font=QFont(), Qt::Alignment align=Qt::AlignHCenter, QPointF point=QPointF(0, 0))</td></tr>
<tr class="memdesc:a9410fd6a9a0bffbd6e9151266cabce05"><td class="mdescLeft">&#160;</td><td class="mdescRight">addText 标准功能 <br /></td></tr>
<tr class="separator:a9410fd6a9a0bffbd6e9151266cabce05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac37d7691b8893d1223be096593bd6833"><td class="memItemLeft" align="right" valign="top"><a id="ac37d7691b8893d1223be096593bd6833"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>addTable</b> (const QTableView *table, QPointF pos=QPointF(0, 0))</td></tr>
<tr class="separator:ac37d7691b8893d1223be096593bd6833"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13a0a946124c71624fa772187d62b70b"><td class="memItemLeft" align="right" valign="top"><a id="a13a0a946124c71624fa772187d62b70b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>addSignoffText</b> (const QString &amp;text, QFont m_font=QFont())</td></tr>
<tr class="separator:a13a0a946124c71624fa772187d62b70b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d93336c310628078eec0bf838688c89"><td class="memItemLeft" align="right" valign="top"><a id="a7d93336c310628078eec0bf838688c89"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>pageNum</b> ()</td></tr>
<tr class="separator:a7d93336c310628078eec0bf838688c89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20b8959a7cebdef9b2d1de77ebb6ef5e"><td class="memItemLeft" align="right" valign="top"><a id="a20b8959a7cebdef9b2d1de77ebb6ef5e"></a>
<a class="el" href="class_q_qt_graphics_scene.html">QQtGraphicsScene</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getPage</b> (int num)</td></tr>
<tr class="separator:a20b8959a7cebdef9b2d1de77ebb6ef5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba55c23328e49d6f6c9f33a33392837f"><td class="memItemLeft" align="right" valign="top"><a id="aba55c23328e49d6f6c9f33a33392837f"></a>
QRectF&#160;</td><td class="memItemRight" valign="bottom"><b>clientRectF</b> ()</td></tr>
<tr class="separator:aba55c23328e49d6f6c9f33a33392837f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a632c7b13c981d6a991df99f1630ddc65"><td class="memItemLeft" align="right" valign="top"><a id="a632c7b13c981d6a991df99f1630ddc65"></a>
QRectF&#160;</td><td class="memItemRight" valign="bottom"><b>paperRect</b> ()</td></tr>
<tr class="separator:a632c7b13c981d6a991df99f1630ddc65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e333f342f14507269672df2a024f6a6"><td class="memItemLeft" align="right" valign="top"><a id="a9e333f342f14507269672df2a024f6a6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setMargin</b> (qreal left=375.5898, qreal right=375.5898, qreal top=299.9994, qreal botoom=299.9994)</td></tr>
<tr class="separator:a9e333f342f14507269672df2a024f6a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada2b65ed81c9cf425f58f24f52d998f6"><td class="memItemLeft" align="right" valign="top"><a id="ada2b65ed81c9cf425f58f24f52d998f6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setLineSpacing</b> (qreal mainSpacing=0)</td></tr>
<tr class="separator:ada2b65ed81c9cf425f58f24f52d998f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e423e3a5a53d20c6e9eaf36b0f2a0c5"><td class="memItemLeft" align="right" valign="top"><a id="a1e423e3a5a53d20c6e9eaf36b0f2a0c5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setHeaderHeight</b> (qreal size=195.32)</td></tr>
<tr class="separator:a1e423e3a5a53d20c6e9eaf36b0f2a0c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac805940b023b707dda2d39174c5672fa"><td class="memItemLeft" align="right" valign="top"><a id="ac805940b023b707dda2d39174c5672fa"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setFooterHeight</b> (qreal size=195.32)</td></tr>
<tr class="separator:ac805940b023b707dda2d39174c5672fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e01b1cc266ff351610618d6d9ce837a"><td class="memItemLeft" align="right" valign="top"><a id="a3e01b1cc266ff351610618d6d9ce837a"></a>
QFont&#160;</td><td class="memItemRight" valign="bottom"><b>font</b> ()</td></tr>
<tr class="separator:a3e01b1cc266ff351610618d6d9ce837a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c0d7fec6a505e550b10608cb687234e"><td class="memItemLeft" align="right" valign="top"><a id="a9c0d7fec6a505e550b10608cb687234e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setFont</b> (QFont m_font=QFont())</td></tr>
<tr class="separator:a9c0d7fec6a505e550b10608cb687234e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb5d7820719973d3928275d94466c361"><td class="memItemLeft" align="right" valign="top"><a id="acb5d7820719973d3928275d94466c361"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setHeaderFont</b> (QFont font=QFont())</td></tr>
<tr class="separator:acb5d7820719973d3928275d94466c361"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1406ec3c24c2d35d7ea625c89a74e855"><td class="memItemLeft" align="right" valign="top"><a id="a1406ec3c24c2d35d7ea625c89a74e855"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setHeaderLine</b> (bool show=false)</td></tr>
<tr class="separator:a1406ec3c24c2d35d7ea625c89a74e855"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae65d7ce638d7a2cd58fbce7adcfe54af"><td class="memItemLeft" align="right" valign="top"><a id="ae65d7ce638d7a2cd58fbce7adcfe54af"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setHeaderText</b> (const QString &amp;text, QFont m_font=QFont(), Qt::Alignment align=Qt::AlignHCenter)</td></tr>
<tr class="separator:ae65d7ce638d7a2cd58fbce7adcfe54af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63fa95fbc3e2ffaa40515048b9ca0a83"><td class="memItemLeft" align="right" valign="top"><a id="a63fa95fbc3e2ffaa40515048b9ca0a83"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setFooterFont</b> (QFont font=QFont())</td></tr>
<tr class="separator:a63fa95fbc3e2ffaa40515048b9ca0a83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32e4b27c356ae2a241b044ca672d34bd"><td class="memItemLeft" align="right" valign="top"><a id="a32e4b27c356ae2a241b044ca672d34bd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setFooterLine</b> (bool show=false)</td></tr>
<tr class="separator:a32e4b27c356ae2a241b044ca672d34bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d9deb374f7648617c0d90af0ce16f0e"><td class="memItemLeft" align="right" valign="top"><a id="a2d9deb374f7648617c0d90af0ce16f0e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setFooterText</b> (const QString &amp;text, QFont m_font=QFont(), Qt::Alignment align=Qt::AlignHCenter)</td></tr>
<tr class="separator:a2d9deb374f7648617c0d90af0ce16f0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02130ca6cfa6675c60cde8134af8f7b9"><td class="memItemLeft" align="right" valign="top"><a id="a02130ca6cfa6675c60cde8134af8f7b9"></a>
QFont&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_qt_word.html#a02130ca6cfa6675c60cde8134af8f7b9">mainFont</a> ()</td></tr>
<tr class="memdesc:a02130ca6cfa6675c60cde8134af8f7b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">mainFont 获取默认的固定格式 <br /></td></tr>
<tr class="separator:a02130ca6cfa6675c60cde8134af8f7b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a8f8d1087b636a745dcfe75989829b1"><td class="memItemLeft" align="right" valign="top"><a id="a9a8f8d1087b636a745dcfe75989829b1"></a>
QFont&#160;</td><td class="memItemRight" valign="bottom"><b>titleFont</b> ()</td></tr>
<tr class="separator:a9a8f8d1087b636a745dcfe75989829b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51405ec0dc6ebf8d1a322953e10b4e3b"><td class="memItemLeft" align="right" valign="top"><a id="a51405ec0dc6ebf8d1a322953e10b4e3b"></a>
QFont&#160;</td><td class="memItemRight" valign="bottom"><b>title2Font</b> ()</td></tr>
<tr class="separator:a51405ec0dc6ebf8d1a322953e10b4e3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa40d6efb6fd37d8e9ed8827b834c7ce6"><td class="memItemLeft" align="right" valign="top"><a id="aa40d6efb6fd37d8e9ed8827b834c7ce6"></a>
QFont&#160;</td><td class="memItemRight" valign="bottom"><b>headerFont</b> ()</td></tr>
<tr class="separator:aa40d6efb6fd37d8e9ed8827b834c7ce6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec29996fc37ae81fd3feee12284142d5"><td class="memItemLeft" align="right" valign="top"><a id="aec29996fc37ae81fd3feee12284142d5"></a>
QRectF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_qt_word.html#aec29996fc37ae81fd3feee12284142d5">getTargetRectF</a> (qreal targetDPIX, qreal targetDPIY)</td></tr>
<tr class="memdesc:aec29996fc37ae81fd3feee12284142d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">exportImages 将Word导出为多个图纸. <br /></td></tr>
<tr class="separator:aec29996fc37ae81fd3feee12284142d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f9b45594351de8fd5c3698509192cc7"><td class="memItemLeft" align="right" valign="top"><a id="a7f9b45594351de8fd5c3698509192cc7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>exportImage</b> (QList&lt; QImage &gt; &amp;targetPapers, QRectF targetRect=QRectF())</td></tr>
<tr class="separator:a7f9b45594351de8fd5c3698509192cc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a6572e8ac3de1162e56422b252320d398"><td class="memItemLeft" align="right" valign="top"><a id="a6572e8ac3de1162e56422b252320d398"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>adjustdy</b> (qreal dy0)</td></tr>
<tr class="separator:a6572e8ac3de1162e56422b252320d398"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e6709d01e1a038cd40fc730ed13ceb3"><td class="memItemLeft" align="right" valign="top"><a id="a8e6709d01e1a038cd40fc730ed13ceb3"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>createFrame</b> ()</td></tr>
<tr class="separator:a8e6709d01e1a038cd40fc730ed13ceb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ef7332758334890f0fe14d34261c07a"><td class="memItemLeft" align="right" valign="top"><a id="a4ef7332758334890f0fe14d34261c07a"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>paintPageHeader</b> ()</td></tr>
<tr class="separator:a4ef7332758334890f0fe14d34261c07a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15ecec3665706f32c366826ef588142f"><td class="memItemLeft" align="right" valign="top"><a id="a15ecec3665706f32c366826ef588142f"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>paintPageFooter</b> ()</td></tr>
<tr class="separator:a15ecec3665706f32c366826ef588142f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="class_q_qt_word.html" title="The QQtWord class. ">QQtWord</a> class. </p>
<p>功能支持 添加文字, 可以跨页 添加表格, 可以跨页, 支持经过合并单元格的表格. 添加图片, 太大了会跳页 添加Widget, 太大了会跳页 添加新页面,直接新页面编辑. 设置纸张类型 设置纸张方向</p>
<p>原理介绍 内部使用GraphicScene实现, 使用函数添加内容,自动排版, 可以投影到GraphicView Printer Image等绘图设备.</p>
<p>坐标原理 根据所见即所得. 图纸默认为A4, Rect在PS里能找到, DPI固定为300像素每英寸, 尺寸在WPS Word里能找到. 在A4纸等纸上设计好排版,可以把尺寸直接拿过来用. 接口单位全部为像素.</p>
<p>计算方法: 在A4纸上用尺子量, 然后转换为英寸. paperRect(0, 0, w, h) = dpi * 英寸(w, h).</p>
<p>已经知道的屏幕的分辨率和DPI,帮助用户识别自己的目标画板的大小. 公式 Rect1 : DPI1 = Rect2 : DPI2 从Scene(内部)render()到外部画板的时候,需要计算这个rect. 分类 Rect的像素 DPI Scene 2480*3508(A4) 300 300 DWin屏幕(View) 800*600 136(x) 156(y) 理论值142 138 PC屏幕(View) 1920*1080 96 96 Printer 9917*14033 1200 Image 1920*1080 96 96 可以设置纸张类型, 假如设置A3 DPI不变 SceneRect会变.而这个Rect像素大小,请参照PS.</p>
<p>关于排版的约束</p><ol type="1">
<li>开始设置好纸张,就不要更换,你肯定不想自己的数据被截断显示,内部不会放缩数据.</li>
<li>内部Scene使用默认的分辨率300, rect根据纸的类型而变化. </li>
</ol>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li>R:/Develop/a0-develop/LibQQt/src/frame/<a class="el" href="qqtword_8h_source.html">qqtword.h</a></li>
<li>R:/Develop/a0-develop/LibQQt/src/frame/qqtword.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
